﻿using System.Web;
using Core.Library;

namespace DataObject
{
    public class UserHelpers
    {
        /*
        public CustomerObject CurrentCustomer
        {
            

        }
        */

        public static bool IsLoggedIn()
        {
            return ConvertUtility.ToBoolean(HttpContext.Current.Session["session_is_logged_in"]);
        }

        public static string GetCurrentUserName()
        {
            try { return HttpContext.Current.Session["session_username"].ToString(); }
            catch { return string.Empty; }
        }

        public static string GetCurrentAvatar()
        {
            try { return HttpContext.Current.Session["session_avatar"].ToString(); }
            catch { return string.Empty; }
        }
    }
}
